Cmd
Introduction所有命令类(Esc,TSC,cpcl,针打)的基类 The base class for all command classes (Esc, TSC, cpcl, and pin) Methods
AddMemory:Addsize:ParametersDiscussionExpand memory Append:-(void)Append:(NSData *)data; ParametersDiscussion* 添加指令,到缓存中,以便最后调用GetCmd时,使用 Add instructions to the cache for use in the last call to GetCmd Append:len:添加指令,到缓存中,以便最后调用GetCmd时,使用 * Add instructions to the cache for use in the last call to GetCmd ParametersDiscussion* Clear-(void)Clear; Discussion清除缓存数据 Clear the cache data GetAskPrintOkCmd-(NSData *)GetAskPrintOkCmd; Discussion询问是否打印成功,成功能返回$80,失败不返回,适用于定制客户 Rpp80Use Ask if the print is successful, the function returns $80, failure does not return For custom customers Rpp80Use GetBarCodeCmd:codeType:scode:codeError:-(NSData *_Nullable) GetBarCodeCmd:(BarcodeSetting *_Nonnull)barcodeset codeType:(BarcodeType)codeType scode:(nonnull NSString * )scode codeError:(PrinterCodeError *_Nonnull)codeError; ParametersReturn ValueNSData Discussion获取条码指令 Get barcode instructions GetBeepCmd:interval:- (NSData *) GetBeepCmd:(Byte)level interval:(Byte)interval; ParametersDiscussion发出beep声 Beep sound GetBitMapCmd:image:-(NSData *) GetBitMapCmd:(BitmapSetting *) bitmapSetting image:(UIImage *) image; ParametersReturn ValueNSData Discussion获取图片打印命令 Get the picture print order GetBitMapCmdExt:image:-(NSData *) GetBitMapCmdExt:(BitmapSetting *) bitmapSetting image:(UIImage *) image; ParametersReturn ValueNSData Discussion获取图片打印命令 (用于Esc命令,打印长图片时,并且用wifi,usb连接) Get the picture print order(Used for the Esc command, when printing long images, and connected with wifi, usb) GetCmd-(NSData *_Nullable) GetCmd; Return ValueNSData Discussion*获取所有通过调用Append方法生成的指令 *Get all the instructions generated by calling the Append method GetCodePageCmd:-(NSData *)GetCodePageCmd:(NSString *)codepage; Discussion设置codepage set the codepage for ESC GetCRCmd-(NSData *) GetCRCmd; Return ValueNSData Discussion获取打印回车的指令 Get print carriage return instruction GetCutPaperCmd:- (NSData *) GetCutPaperCmd:(CutterMode) cutterMode; ParametersDiscussion切纸控制命令 Paper cutting control command GetFeedAndCutPaperCmd:FeedDistance:- (NSData *) GetFeedAndCutPaperCmd:(BOOL)isFeed FeedDistance:(Byte)FeedDistance; ParametersDiscussion选择切纸模式并切纸 (for ESC) Select the cut mode and cut the paper GetHeaderCmd-(NSData *) GetHeaderCmd; Discussion获取初始化命令头 Get initialization command header GetHeaderCmd:-(NSData *) GetHeaderCmd:(CommonSetting *_Nonnull)ComSetting; Discussion获取初始化命令头,并根据ComSetting设置相关参数 Get initialization command header, and set parameters according to ComSetting GetLFCmd-(NSData *) GetLFCmd; Return ValueNSData Discussion获取换行的指令 Get line feed instruction GetLFCRCmd-(NSData *_Nonnull) GetLFCRCmd; Return ValueNSData Discussion获取回车换行的指令 Get the carriage return line feed instruction GetNullData-(NSData *_Nullable) GetNullData; Return ValueNSData Discussion获取空的NSData Get empty NSData GetOpenDrawerCmd:startTime:endTime:- (NSData *) GetOpenDrawerCmd:(Byte)DrawerNumber startTime:(Byte)pulseStartTime endTime:(Byte)PulseEndTime; ParametersDiscussion打开钱箱 Open the cashbox GetPrintEndCmd-(NSData *_Nullable) GetPrintEndCmd; Return ValueNSData Discussion获取打印结束的指令(针打是退纸用,TSC,CPCL是发送打印命令,ESC:回车换行指令) Get the end of the print order (Pincmd is used for rewinding, TSC, CPCL is to send print commands, ESC: carriage return line feed command) GetPrintEndCmd:-(NSData *_Nullable) GetPrintEndCmd:(NSInteger)copies; ParametersReturn ValueNSData Discussion获取打印结束的指令(针打是退纸用,TSC,CPCL是发送打印命令,ESC:回车换行指令) Get the end of the print order (Pincmd is used for rewinding, TSC, CPCL is to send print commands, ESC: carriage return line feed command) GetPrintStautsCmd:- (NSData *) GetPrintStautsCmd:(PrintStautsCmd) printStautsCmd; Discussionfor RP410 ZPL Custom customer U.S.A CMC RP806 TSC Custom U.S.A MINI PACK GetSelftestCmd-(NSData *) GetSelftestCmd; Return ValueNSData Discussion获取打印自测页的指令 Get instructions to print a self-test page GetTextCmd:text:-(NSData *) GetTextCmd:(TextSetting *)textSetting text:(NSString *)text; ParametersReturn Value返回命令数据 Return command data Discussion根据textSetting 得到对应的文本指令 By textSetting get the corresponding text instruction ImportData:-(NSData *) ImportData:(nonnull NSString*) data; ParametersReturn Value返回指定encodingType编码的数据 Returns data of the specified encodingType encoding Discussion生成指定encodingType编码的数据 MoveData:dest:index:ParametersDiscussion把source的值赋值给dest,dest从index开始赋值,每赋一个字节index会加1 The value of the source assigned to dest, dest from the index assignment, each assigned a byte index will increase by one MoveData:ibegin:len:dest:dindex:-(void)MoveData:(Byte *)source ibegin:(NSInteger)ibegin len:(NSInteger) len dest:(Byte *)dest dindex:(NSInteger *)dindex; ParametersDiscussion把source的值(从ibegin开始到,长度为len)赋值到dest,dest从index开始赋值,每赋一个字节index会加1 The source value (starting from ibegin to length len) assigned to dest, dest from the index assignment, each assigned a byte index will increase by 1 PropertiesbarcodeBufferSize@property (nonatomic) NSInteger barcodeBufferSize; Discussion条形码结束后,要在打印几个结束符0x00, 默认为1 After the end of the bar code, to print a few end characters 0x00, the default is 1 encodingType@property (nonatomic) EncodingType encodingType; Discussion编码格式 Encoding Type |